x86/amd: Add support for read-only APERF/MPERF
authorMark Langsdorf <mark.langsdorf@amd.com>
Sat, 13 Aug 2011 09:13:38 +0000 (10:13 +0100)
committerMark Langsdorf <mark.langsdorf@amd.com>
Sat, 13 Aug 2011 09:13:38 +0000 (10:13 +0100)
commitabe7415dd94258648d5a505bce54b7de75b989c3
tree0dc4d4249110cedf77d86340de4c51fbd75ef231
parent356ea64599b7bc49f570d747f3fcee8cb7768d99
x86/amd: Add support for read-only APERF/MPERF

AMD is adding support for a read-only mode of the APERF
and MPERF MSRs. When this mode is enabled, writes to
these registers are ignored and do no reset the registers.
This allows multiple well-behaved programs to share the
use of the registers even if a poorly behaved program
attempts to reset them. Support for this feature is
indicated by a CPUID bit.

AMD has been recommending that well-behaved software
avoid resetting the APERF and MPERF MSRs. Enabling
this feature should not change the behavior of well-
behaved software. This change has been tested with the
turbostat and cpufreq-aperf applications.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
xen/arch/x86/cpu/amd.c